/*
 * $Id: Level2Planning.java 1599 2011-08-21 10:44:52Z jyang $
 * 
 * Copyright (c) 2001-2008 Accentrix Company Limited. All Rights Reserved.
 * 
 * Accentrix Company Limited. ("Accentrix") retains copyright on all text, source
 * and binary code contained in this software and documentation. Accentrix grants
 * Licensee a limited license to use this software, provided that this copyright
 * notice and license appear on all copies of the software. The software source
 * code is provided for reference purposes only and may not be copied, modified 
 * or distributed.
 * 
 * THIS SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS," WITHOUT ANY WARRANTY OF
 * ANY KIND UNLESS A SEPARATE WARRANTIES IS PURCHASED FROM ACCENTRIX AND REMAINS
 * VALID.  ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
 * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 * PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. ACCENTRIX SHALL NOT BE LIABLE
 * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING OR MODIFYING THE
 * SOFTWARE OR ITS DERIVATIVES.
 * 
 * IN NO EVENT WILL ACCENTRIX BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR
 * FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES,
 * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE
 * USE OF OR INABILITY TO USE SOFTWARE, EVEN IF ACCENTRIX HAS BEEN ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES.
 */
package com.lightsaber.trade.cloth.entity.planning;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.lightsaber.trade.core.entity.BaseEntity;

@Entity
@Table(name = "MHPP_LEVEL_2_PLANNING")
public class Level2Planning extends BaseEntity {

    private static final long serialVersionUID = 339529173121122L;

    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PLANNING_ID", unique = true, updatable = false, nullable = true)
    private Planning planning;

    @Column(name = "PLANNING_EXERCISE", nullable = false)
    private Integer planningExercise;

    @Column(name = "REMARKS", length = 1000)
    private String remarks;

    @OneToMany(mappedBy = "level2Planning", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    private List<ProgrammePlanningItem> programmePlanningItems;

    @OneToMany(mappedBy = "level2Planning", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    private List<Level2DisciplineStatus> level2DisciplineStatusList;

    public Integer getPlanningExercise() {
        return planningExercise;
    }

    public void setPlanningExercise(final Integer planningExercise) {
        this.planningExercise = planningExercise;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(final String remarks) {
        this.remarks = remarks;
    }

    public List<ProgrammePlanningItem> getProgrammePlanningItems() {
        return programmePlanningItems;
    }

    public void setProgrammePlanningItems(final List<ProgrammePlanningItem> programmePlanningItems) {
        this.programmePlanningItems = programmePlanningItems;
    }

    public Planning getPlanning() {
        return planning;
    }

    public void setPlanning(final Planning planning) {
        this.planning = planning;
    }

    public List<Level2DisciplineStatus> getLevel2DisciplineStatusList() {
        return level2DisciplineStatusList;
    }

    public void setLevel2DisciplineStatusList(
            final List<Level2DisciplineStatus> level2DisciplineStatusList) {
        this.level2DisciplineStatusList = level2DisciplineStatusList;
    }

}
